//单例模式
public class MyLock {
    private MyLock(){}
    private static MyLock ml;
    public static MyLock getInstance(){
        if(ml==null){
            MyLock m = new MyLock();
            return m;
        }
        return ml;
    }
}
